package cn.huangsm.advance.designmode.momento;

/**
 * @author huang
 * @PACKAGE_NAME cn.huangsm.advance.designmode.momento
 * @PROJECT_NAME advance-code
 * @date 2019/1/24
 */
public class MainClass {
    public static void main(String[] args) {
        Person person = new Person("huangsm", "男", 22);
        //保存用户状态
        Person backup = new Person();
        backup.setName(person.getName());
        backup.setSex(person.getSex());
        backup.setAge(person.getAge());

        System.out.println(backup);

    }
}
